import React from 'react'
import { Flex } from 'antd-mobile'
import styles from './index.module.scss'
import classNames from 'classnames'

/**
 * 抽取筛选组件下面的公共部分
 */
function FilterFooter ({cancelText, sureText, onCancel, onOk}) {

  return <Flex className={styles.root} align='center'>
    <span className={classNames(styles.btn, styles.cancel)} onClick={onCancel}>{cancelText}</span>
    <span className={classNames(styles.btn, styles.ok)} onClick={onOk}>{sureText}</span>
  </Flex>
}

FilterFooter.defaultProps = {
  cancelText: '取消',
  sureText: '确定'
}

export default FilterFooter